package com.xaicode.template.gendata.network;

import com.xaicode.template.gendata.base.Generator;
import org.apache.commons.lang3.RandomStringUtils;

/**
 * @author Locker xaicode@sina.com
 * @version 1.0
 * @date 2022/5/24 0024 21:09
 */
public class NetEmail extends Generator {

    private static NetEmail instance = new NetEmail();

    private NetEmail() {
    }

    public static NetEmail getInstance() {
        return instance;
    }

    @Override
    public String generate() {
        StringBuilder result = new StringBuilder();
        result.append(RandomStringUtils.randomAlphanumeric(10));
        result.append("@");
        result.append(RandomStringUtils.randomAlphanumeric(5));
        result.append(".");
        result.append(RandomStringUtils.randomAlphanumeric(3));

        return result.toString().toLowerCase();
    }

}
